// 一级路由
import Home from '../views/home/index'
import Login from '../views/login/index'
// 二级路由
import Delivery from '../views/home/pages/delivery'
import Cart from '../views/home/pages/cart'


const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    children: [
      {
        path: '/home',
        redirect: '/home/delivery'
      },
      {
        path: '/home/delivery',
        component: Delivery
      },
      {
        path: '/home/cart',
        component: Cart
      }
    ]
  },
  {
    path: '/login',
    component: Login
  },
]

export default routes;